<div class="content_block col-xs-12 col-sm-12 col-md-12 col-lg-12">
  <form action="<?php echo base_url('admin/restaurant/add'); ?>" id="signup-form" class="form-horizontal" role="form" method="post">
    <h2>เพิ่มร้านอาหาร</h2>
      <div class="form-group">
        <div class="col-sm-3"></div>
        <!--<div class="col-sm-4">
          <img alt="Image Display Here" id="test" src="<?php echo $imagepath;?>/user.png" width="200px" height="200px"/>
          <input onchange="readURL(this);" type="file" />
        </div>-->
        </div>
      <?php if(!empty($resDetail["id"])){
        ?>
        <input type="hidden" class="form-control" name="id" value="<?php echo $resDetail["id"];?>">
        <?php
      }
      ?>
      <div class="form-group">
        <label class="col-sm-3 control-label" for="username">ชื่อร้าน</label>
        <div class="col-sm-4">
          <input type="text" class="col-sm-4 form-control required" name="title" id="username" value="<?php if(!empty($resDetail["title"])){ echo $resDetail["title"]; }?>">
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label" for="address">รายละเอียด</label>
        <div class="col-sm-4">
          <textarea class="col-sm-4 form-control required" name="content"  rows="3" id="address"><?php if(!empty($resDetail["content"])){ echo $resDetail["content"]; }?></textarea>
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-3 control-label">ประเภทร้าน</label>
        <div class="col-sm-3">
            <label class="checkbox-inline">
            <input type="checkbox" name="tag[]" value="1" id="gender[m]">อาหารไทย</label><br />
            <label class="checkbox-inline">
            <input type="checkbox" name="tag[]" value="2" id="gender[m]">อาหารต่างประเทศ</label><br />
            <label class="checkbox-inline">
            <input type="checkbox" name="tag[]" value="3" id="gender[m]">อาหารอีสาน</label><br />
            <label class="checkbox-inline">
            <input type="checkbox" name="tag[]" value="4" id="gender[m]">อาหารทะเล</label>
        </div>
        <div class="col-sm-3">
            <label class="checkbox-inline">
            <input type="checkbox" name="tag[]" value="5" id="gender[m]">อาหารเช้า</label><br />
            <label class="checkbox-inline">
            <input type="checkbox" name="tag[]" value="6" id="gender[m]">ก๋วยเตี่๋ยว</label><br />
            <label class="checkbox-inline">
            <input type="checkbox" name="tag[]" value="7" id="gender[m]">กึ่งผับ/บาร์</label><br />
            <label class="checkbox-inline">
            <input type="checkbox" name="tag[]" value="8" id="gender[m]">บุฟเฟ่ต์</label>
        </div>
        <div class="col-sm-3">
            <label class="checkbox-inline">
            <input type="checkbox" name="tag[]" value="9" id="gender[m]">ขนม-ของหวาน</label><br />
            <label class="checkbox-inline">
            <input type="checkbox" name="tag[]" value="10" id="gender[m]">เครื่องดื่ม</label><br />
            <label class="checkbox-inline">
            <input type="checkbox" name="tag[]" value="11" id="gender[m]">เพื่อสุขภาพ</label>
        </div>


      </div>
      <br />

      <div class="form-group">
        <label class="col-sm-3 control-label" for="username">เว็บ</label>
        <div class="col-sm-4">
          <input type="text" class="col-sm-4 form-control required" name="url" id="username" value="<?php if(!empty($resDetail["url"])){ echo $resDetail["url"]; }?>">
        </div>
      </div>
      <div class="hidden">
        <?php 

          $dateTime = new DateTime('now', new DateTimeZone('Asia/Bangkok'));

        ?>
        <input type="text" class="col-sm-4 form-control required" name="comment_status" id="username" value="1">
        <input type="text" class="col-sm-4 form-control required" name="update_date" id="username" value="<?php echo $dateTime->format('Y-m-d H:i:s');?>">
        <input type="text" class="col-sm-4 form-control required" name="status" id="username" value="1">
        <!--<input type="text" class="col-sm-4 form-control required" name="type" id="username" value="restaurant">-->
        <input type="text" class="col-sm-4 form-control required" name="view" id="username" value="1">
        <input type="text" class="col-sm-4 form-control required" name="usr_ip" id="username" value="192.168">
        <input type="text" class="col-sm-4 form-control required" name="usr_id" id="username" value="<?php echo $user["id"];?>">
        <input type="text" class="col-sm-4 form-control required" name="cr_date" id="username" value="<?php echo $dateTime->format('Y-m-d H:i:s');?>">
        <input type="text" class="col-sm-4 form-control required" name="lu_date" id="username" value="<?php echo $dateTime->format('Y-m-d H:i:s');?>">
        <input type="text" class="col-sm-4 form-control required" name="lu-uid" id="username" value="1">
        <input type="text" class="col-sm-4 form-control required" name="comment_count" id="username" value="1">
      </div>
      <div class="form-group">
        <div class="col-sm-offset-3 col-sm-9">
          <button type="submit" class="btn btn-primary" id="submitbtn" name="submit" value="submit">ยืนยัน</button>
          <a href="<?php echo base_url("admin/restaurant/add");?>" class="btn btn-default">ยกเลิก</a>
        </div>
      </div>
  </form>
</div>